home *** CD-ROM | disk | FTP | other *** search
/ Champak 119 / (Vol 119) Nov 09 2010.iso / TGKI-109 / Games / crusade_of_cuisine.swf / scripts / frame_3 / DoAction.as
Text File  |  2010-11-09  |  3KB  |  139 lines

  1. stop();
  2. var treeTimer = 0;
  3. var optionPresented = 0;
  4. var modeCounter = 1;
  5. var mode_text = "unknown";
  6. var difficulty = 1;
  7. var instructionPresented = 0;
  8. menu_whole.onEnterFrame = function()
  9. {
  10.    treeTimer++;
  11.    treeTimer %= 1200;
  12.    if(treeTimer == 500)
  13.    {
  14.       this.menu_tree.tree_1.gotoAndPlay("tree_hide");
  15.    }
  16.    if(treeTimer == 600)
  17.    {
  18.       this.menu_tree.tree_2.gotoAndPlay("tree_hide");
  19.    }
  20.    if(treeTimer == 700)
  21.    {
  22.       this.menu_tree.tree_3.gotoAndPlay("tree_hide");
  23.    }
  24.    if(treeTimer == 800)
  25.    {
  26.       this.menu_tree.tree_4.gotoAndPlay("tree_hide");
  27.    }
  28.    if(treeTimer == 1100)
  29.    {
  30.       this.menu_tree.tree_1.gotoAndPlay("tree_hide");
  31.       this.menu_tree.tree_2.gotoAndPlay("tree_hide");
  32.       this.menu_tree.tree_3.gotoAndPlay("tree_hide");
  33.       this.menu_tree.tree_4.gotoAndPlay("tree_hide");
  34.    }
  35.    optionButton();
  36.    instructionButton();
  37. };
  38. menu_whole.credit_btn.onRelease = function()
  39. {
  40.    creditRoll_mv.gotoAndPlay("play");
  41. };
  42. optionButton = function()
  43. {
  44.    if(optionPresented == 1)
  45.    {
  46.       option_mov._y += 20;
  47.       if(option_mov._y >= 100)
  48.       {
  49.          option_mov._y = 100;
  50.       }
  51.    }
  52.    if(optionPresented == 0)
  53.    {
  54.       option_mov._y -= 20;
  55.       if(option_mov._y <= -250)
  56.       {
  57.          option_mov._y = -250;
  58.       }
  59.    }
  60.    if(modeCounter == 0)
  61.    {
  62.       option_mov.mode_text = "Easy";
  63.       difficulty = 0.5;
  64.    }
  65.    if(modeCounter == 1)
  66.    {
  67.       option_mov.mode_text = "Normal";
  68.       difficulty = 1;
  69.    }
  70.    if(modeCounter == 2)
  71.    {
  72.       option_mov.mode_text = "Hard";
  73.       difficulty = 1.5;
  74.    }
  75.    menu_whole.option_btn.onRelease = function()
  76.    {
  77.       optionPresented++;
  78.       optionPresented %= 2;
  79.    };
  80.    option_mov.mode_btn.onRelease = function()
  81.    {
  82.       modeCounter++;
  83.       modeCounter %= 3;
  84.    };
  85. };
  86. instructionButton = function()
  87. {
  88.    if(instructionPresented == 1)
  89.    {
  90.       instruction_mov._y += 20;
  91.       if(instruction_mov._y >= 250)
  92.       {
  93.          instruction_mov._y = 250;
  94.       }
  95.    }
  96.    if(instructionPresented == 0)
  97.    {
  98.       instruction_mov._y -= 20;
  99.       if(instruction_mov._y <= -400)
  100.       {
  101.          instruction_mov._y = -400;
  102.       }
  103.    }
  104.    menu_whole.inst_btn.onRelease = function()
  105.    {
  106.       instructionPresented++;
  107.       instructionPresented %= 2;
  108.    };
  109.    instruction_mov.lina_profile_btn.onRelease = function()
  110.    {
  111.       instruction_mov.gotoAndStop("profile_lina");
  112.    };
  113.    instruction_mov.nelly_profile_btn.onRelease = function()
  114.    {
  115.       instruction_mov.gotoAndStop("profile_nelly");
  116.    };
  117.    instruction_mov.char_btn.onRelease = function()
  118.    {
  119.       instruction_mov.gotoAndStop("profile_nelly");
  120.    };
  121.    instruction_mov.control_btn.onRelease = function()
  122.    {
  123.       instruction_mov.gotoAndStop("control");
  124.    };
  125.    instruction_mov.weapon_btn.onRelease = function()
  126.    {
  127.       instruction_mov.gotoAndStop("weapon");
  128.    };
  129.    instruction_mov.other_btn.onRelease = function()
  130.    {
  131.       instruction_mov.gotoAndStop("other");
  132.    };
  133. };
  134. menu_whole.newgame_btn.onRelease = function()
  135. {
  136.    gotoAndStop("story_1");
  137.    play();
  138. };
  139.